import fs from 'fs'
import path from 'path'
export default async (ctx, next) => {
  const { download } = ctx.request.body;
  ctx.response.set('content-type', 'application/octet-stream');
  ctx.body = fs.readFileSync(path.join(__dirname, '../public/', download))
}